package kr.hkit.powerjava.chapter20;

import java.util.Calendar;
import java.util.Date;

public class DateEx {
	public static void main(String[] args) {
		Date d = new Date();
		
		System.out.println(d);
		System.out.println("year : "+(1900+d.getYear()));
		System.out.println("month : "+(d.getMonth()+1));
		System.out.println("day : "+d.getDate());
		
		Calendar cal = Calendar.getInstance();
		System.out.println(cal);
		System.out.println(cal.get(Calendar.YEAR) + "년");
		System.out.println(cal.get(Calendar.MONTH)+1 + "월");
		System.out.println(cal.get(Calendar.DATE)+"일");
		
		
		
	}
}
